package me.huha.commons;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;


/**
 * @Title: AddressTDO.java
 * @Author: Yepx
 * @mail: yepx2013@gmail.com
 * @CreateTime: 2017年6月7日 下午2:34:19
 * @Todo: 发件人，收件人，抄送人，密送人基本信息
 */
public class AddressDTO implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1648950930165832506L;

	public AddressDTO(){}
	public AddressDTO(String nickName, String email) {
		super();
		if(StringUtils.isNotBlank(nickName)){
			this.nickName = nickName;
		}else{
			this.nickName = email.split("@")[0];
		}
		
		this.email = email;
	}

	/** 昵称 */
	private String nickName;
	/** 地址 */
	private String email;

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "AddressTDO [nickName=" + nickName + ", email=" + email + "]";
	}

}
